package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.user.example.UserExample;

import javax.validation.constraints.NotNull;

import java.util.List;

import static org.jsola.hr.example.ChannelExample.E_ADDRESS;
import static org.jsola.hr.example.ChannelExample.E_ADMIN_USER_ID;
import static org.jsola.hr.example.ChannelExample.E_BANK_NO;
import static org.jsola.hr.example.ChannelExample.E_CHANNEL_GROUP_ID;
import static org.jsola.hr.example.ChannelExample.E_IDCARD;
import static org.jsola.hr.example.ChannelExample.E_NAME;
import static org.jsola.hr.example.ChannelExample.E_PHONE;
import static org.jsola.hr.example.ChannelExample.M_ADDRESS_MAX;
import static org.jsola.hr.example.ChannelExample.M_ADMIN_USER_ID_MAX;
import static org.jsola.hr.example.ChannelExample.M_BANK_NO_MAX;
import static org.jsola.hr.example.ChannelExample.M_CHANNEL_GROUP_ID_MAX;
import static org.jsola.hr.example.ChannelExample.M_IDCARD_MAX;
import static org.jsola.hr.example.ChannelExample.M_NAME_MAX;
import static org.jsola.hr.example.ChannelExample.M_PHONE_MAX;
import static org.jsola.hr.example.ChannelExample.N_ADDRESS;
import static org.jsola.hr.example.ChannelExample.N_ADMIN_USER_ID;
import static org.jsola.hr.example.ChannelExample.N_BANK_NO;
import static org.jsola.hr.example.ChannelExample.N_CHANNEL_GROUP_ID;
import static org.jsola.hr.example.ChannelExample.N_IDCARD;
import static org.jsola.hr.example.ChannelExample.N_NAME;
import static org.jsola.hr.example.ChannelExample.N_PHONE;
import static org.jsola.user.example.UserExample.E_PASSWORD;
import static org.jsola.user.example.UserExample.N_PASSWORD;

/**
 * 渠道管理
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【渠道管理】的参数")
@Data
public class ChannelAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_CHANNEL_GROUP_ID, example = E_CHANNEL_GROUP_ID)
    @Length(max = 50, message = M_CHANNEL_GROUP_ID_MAX)
    private String channelGroupId;

    @ApiModelProperty(notes = N_ADDRESS, example = E_ADDRESS)
    @Length(max = 50, message = M_ADDRESS_MAX)
    private String address;

    @ApiModelProperty(notes = N_NAME, example = E_NAME)
    @Length(max = 32, message = M_NAME_MAX)
    private String name;

    @ApiModelProperty(notes = N_PHONE, example = E_PHONE)
    @Length(max = 20, message = M_PHONE_MAX)
    private String phone;

    @ApiModelProperty(notes = N_IDCARD, example = E_IDCARD)
    @Length(max = 18, message = M_IDCARD_MAX)
    private String idcard;

    @ApiModelProperty(notes = N_BANK_NO, example = E_BANK_NO)
    @Length(max = 20, message = M_BANK_NO_MAX)
    private String bankNo;

    @ApiModelProperty(notes = N_ADMIN_USER_ID, example = E_ADMIN_USER_ID)
    @Length(max = 32, message = M_ADMIN_USER_ID_MAX)
    private String adminUserId;

    @ApiModelProperty(notes = UserExample.N_NAME, example = UserExample.E_NAME, required = true)
    @NotNull
    @Length(max = 255)
    private String userName;

    @ApiModelProperty(notes = "人力角色id", example = "1")
    @NotNull(message = "人力角色不能为空")
    private Long hrRoleId;

    @ApiModelProperty(notes = "用工单位分组ids")
    private List<String> childCompanyIdList;

    @ApiModelProperty(notes = "用工单位ids")
    private List<String> employerIdList;

    @ApiModelProperty(notes = "是否是全部用工单位分组", example = "1:是,0:否")
    private Boolean isAllChildCompany;

    @ApiModelProperty(notes = N_PASSWORD, example = E_PASSWORD)
    @Length(max = 255)
    private String password;


}

